package com.packagegpt.config;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

/*
 *@Time：2023/5/28
 *@Author：Jelly
 */
@Data
@ConfigurationProperties(prefix = "chatgpt")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ChatGPTProperties {
    /**
     * OpenAi token string "sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
     * OpenAi 的apikey
     */
    private String token;

    /**
     * The name of the model to use.
     * 要使用的模型的名称。
     * Required if specifying a fine-tuned model or if using the new v1/completions endpoint.
     * 如果指定微调模型或使用新的 v1/完成终结点，则为必需。
     */
    @Builder.Default
    private String model = "text-davinci-003";

    /**
     * chatModel which use by createChatCompletion
     */
    @Builder.Default
    private String chatModel = "gpt-3.5-turbo";

    /**
     * Timeout retries
     */
    @Builder.Default
    private int retries = 5;

    /**
     * proxyHost
     */
    private String proxyHost;

    /**
     * proxyPort
     */
    private int proxyPort;

    /**
     * sessionExpirationTime
     */
    private Integer sessionExpirationTime;
}
